﻿#define  _CRT_SECURE_NO_WARNINGS
#include "Listnode.h"

void test01()
{
	LTNode* plist = LTInit(); //创建双链表的头结点
	////尾插
	//LTPushBack(plist, 1);
	//LTPushBack(plist, 2);
	//LTPushBack(plist, 3);
	//LTPushBack(plist, 4);
	//LTPrint(plist);
	////尾删
	//LTPopBack(plist);
	//LTPrint(plist);
	//LTPopBack(plist);
	//LTPrint(plist);
	//LTPopBack(plist);
	//LTPrint(plist);
	//LTPopBack(plist);
	//LTPrint(plist);
	/*LTPopBack(plist);
	LTPrint(plist);*/
	//头插
	LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPushFront(plist, 3);
	LTPushFront(plist, 4);
	LTPrint(plist);
	//头删
	//LTPopFront(plist);
	//LTPrint(plist);
	//LTPopFront(plist);
	//LTPrint(plist);
	//LTPopFront(plist);
	//LTPrint(plist);
	//LTPopFront(plist);
	//LTPrint(plist);
	//LTPopFront(plist);
	//LTPrint(plist);
	/*LTNode* ret = LTFind(plist, 4);*/
	/*if (ret != NULL)
		printf("找到了\n");
	else
		printf("没找到\n");*/
	//在pos位置之后插⼊数据
	//LTInsert(ret, 99);
	//LTPrint(plist);
	//删除指定位置
	//LTErase(ret);
	//LTPrint(plist);
	//销毁顺序表
	LTDestroy(plist);
	plist = NULL;

}
int main()
{
	test01();
	return 0;
}